const { http } = uni.$u
// 获取菜单
// export const fetchMenu = (params, config = {}) => http.post('/ebapi/public_api/index', params, config)

// export const getCateList = (data) => http.get(`/prod-api/webApi/cateList/${data}`)

// 登录
export const doLogin = (params, config = {}) => http.post('/font/common/v1/doLogin', params, config)

// 注册
export const doRegistry = (params, config = {}) => http.post('/font/common/v1/doRegistry', params, config)


// 通知公告
export const noticeList = (data) => http.get(`/font/common/v1/noticeList`)

// 答题
export const topicList = (data) => http.get(`/font/common/v1/topicList`)

// 教练查询学员列表
export const queryTraineeList = (id) => http.get(`/font/common/v1/queryTraineeList/${id}`)

// 教练管理查询车辆列表
export const manageVehicleList = (name) => http.get(`/font/common/v1/manageVehicleList`)
export const manageVehicleList2 = (name) => http.get(`/font/common/v1/manageVehicleList?carNumber=${name}`)

// 教练管理新增车辆
export const saveVehicle = (params, config = {}) => http.post('/font/common/v1/saveVehicle', params, config)

// 教练管理删除车辆
export const delVehicle = (id) => http.get(`/font/common/v1/delVehicle/${id}`)

// 教练管理查询车辆信息
export const queryVehicleDetail = (id) => http.get(`/font/common/v1/queryVehicleDetail/${id}`)

// 教练管理修改车辆
export const updateVehicle = (params, config = {}) => http.post('/font/common/v1/updateVehicle', params, config)

// 教练删除学员
export const delTrainee = (id) => http.get(`/font/common/v1/delTrainee/${id}`)

// 教练课时管理列表
export const manageClassHours = (id) => http.get(`/font/common/v1/manageClassHours/${id}`)

// 教练新增课时信息
export const saveClassHours = (params, config = {}) => http.post('/font/common/v1/saveClassHours', params, config)

// 教练删除课时信息
export const delClassHours = (id) => http.get(`/font/common/v1/delClassHours/${id}`)

// 教练查询课时信息
export const queryClassHoursInfo = (id) => http.post(`/font/common/v1/queryClassHoursInfo/${id}`)

// 教练修改课时信息
export const updateClassHours = (params, config = {}) => http.post('/font/common/v1/updateClassHours', params, config)

// 教练查询已存在课程
export const queryCourseList = (id) => http.post(`/font/common/v1/queryCourseList/${id}`)

// 教练待确认列表
export const confirmList = (id) => http.get(`/font/common/v1/confirmList/${id}`)

// 教练确认预约
export const confirm = (coachId, traineeId) => http.get(`/font/common/v1/confirm/${coachId}/${traineeId}`)


// 学员课时列表
export const classHoursList = (id) => http.post(`/font/common/v1/classHoursList/${id}`)

// 学员课程列表
export const courseList = (id) => http.post(`/font/common/v1/courseList/${id}`)

// 学员购买课程
export const buyCourse = (params, config = {}) => http.post('/font/common/v1/buyCourse', params, config)

// 学员预约报名
export const subscribe = (params, config = {}) => http.post('/font/common/v1/subscribe', params, config)

// 学员查看教练列表
export const coachList = (id) => http.post(`/font/common/v1/coachList`)

// 学员评价教练
export const evaluate = (params, config = {}) => http.post('/font/common/v1/comments', params, config)

// 教练评论列表
export const evaluateList = (id) => http.get(`/font/common/v1/comments/${id}`)

// 教学资源列表
export const resourcesList = (id) => http.get(`/font/common/v1/resourcesList`)

// 教练评论列表
export const commentsList = (id) => http.get(`/font/common/v1/comments/${id}`)


// 修改用户信息
export const updateInfo = (params, config = {}) => http.post('/font/common/v1/updateInfo', params, config)

// 学员取消预约
export const cancelSubscribe = (traineeId,classHoursId) => http.get(`/font/common/v1/cancelSubscribe/${traineeId}/${classHoursId}`)

// 学员查询预约列表
export const subscriptList = (traineeId) => http.get(`/font/common/v1/subscriptList/${traineeId}`)

// 教练待确认列表
export const coachIdList = (coachId) => http.get(`/font/common/v1/confirmList/${coachId}`)

// 教练确认预约
export const confirMorder = (subscribeId,info) => http.get(`/font/common/v1/confirm/${subscribeId}/${info}`)